#include<stdio.h>
#include<unistd.h>

int main()
{
    pid_t id = fork();
    if(!id)
    {
        int cnt = 500;
        while(cnt--)
        {
            printf("I'm a child process, my pid is:%d, my ppid is:%d, cnt:%d\n", getpid(), getppid(), cnt);
            sleep(1);
        }
    }
    else
    {
        int cnt = 10;
        while(cnt--)
        {
            printf("I'm parent process, my pid is:%d. my ppid is:%d, cnt:%d\n",getpid(), getppid(), cnt);
            sleep(1);
        }
    }
    return 0;
}
